/*
 * cCaseGPL.java
 *
 * Created on 5. juillet 2007, 13:55
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package pacman;

/**
 * This type of case is a "GNU Public Liscence" case type. It allows tuxmen to acces it, but doesn't let ghosts (ghosofts) to access. In one word, it's a safe case for tuxmen.
 * @author julien
 */
public class cCaseGPL implements iCase {
    
    /** Creates a new instance of cCaseGPL */
    public cCaseGPL() {
    }

    /**
     * Tells if the case can be accessed by the caller. For this perticular type of case, returns false for ghosts, true for tuxmen.
     * @param caller The caller of the method. Needed for caller-dependant answers.
     * @return True if case can be accessed by caller, otherwise false .
     */
    public boolean isAccessible(Object caller) {
        if(caller instanceof iGhost){
            return false;
        }
        return true;
    }

    /**
     * Does an acces on the case (i.e. tells the case that a pacman has passed through the case).
     * @param pacman The pacman who accesses the case
     */
    public void Access(cPacman pacman) {
    }

    /**
     * Returns the name of the image to be loaded for this case.
     * @return A string containing the name of the image to be loaded for this case.
     */
    public String getImageName() {
        return "casegpl";
    }
    
}
